MOD = 10 ** 9 + 7


class Solution:
    def numberOfWays(self, num_people: int) -> int:
        num_people //= 2

        dp = [0] * (num_people + 2)
        dp[0] = dp[1] = 1

        for i in range(2, num_people + 2):
            for j in range(i):
                dp[i] += dp[j] * dp[i - j]
            dp[i] %= MOD

        return dp[-1]


if __name__ == "__main__":
    print(Solution().numberOfWays(2))  # 1
    print(Solution().numberOfWays(4))  # 2
    print(Solution().numberOfWays(6))  # 5
    print(Solution().numberOfWays(8))  # 14
